package scalaLearning.part2

object CatDemo {
  def main(args: Array[String]): Unit = {
  val cat=new Cat
    cat.name="黑猪"
    cat.age=2
    cat.color="灰色"
    println("创建完成")
    println("小猫的信息如下："+cat.name+" "+cat.age+" "+cat.color)
    println("-------")
    cat.age=3
    println("小猫的信息如下："+cat.name+" "+cat.age+" "+cat.color)
  }
}

class Cat {
  var name: String = _
  var age: Int = _
  var color: String = _
}